# makefile hecho por Ayuso para irradia


PROJECT=irradia
CC=cc
CFLAGS=-c -g -Wall -ffast-math
DEFINES=-DVMS -DLinux
LDFLAGS=-lm /home/ayuso/workspace/dRasclib/librasclib.so
EXECUTABLE=$(PROJECT)

SOURCES= src/api.c src/intersect.c src/texture.c src/apigeom.c src/light.c \
	src/threads.c src/apitrigeom.c src/parallel.c src/trace.c src/camera.c \
	src/rayqueue.c src/ui.c src/coordsys.c src/render.c src/util.c \
	src/global.c src/shade.c src/hash.c src/shade_iterativo.c \
	src/forms/box.c src/forms/plane.c src/forms/triangle.c \
	src/forms/cylinder.c src/forms/quadric.c src/forms/vol.c \
	src/forms/extvol.c src/forms/ring.c src/forms/grid.c \
	src/forms/sphere.c src/measures/measuring.c src/maths/vector.c \
	src/image/imageio.c src/image/jpeg.c src/image/ppm.c \
	src/image/sgirgb.c src/image/winbmp.c src/image/imap.c \
	src/image/pngfile.c src/image/psd.c src/image/tgafile.c \
	demosrc/ac3dparse.c demosrc/main.c demosrc/nffparse.c \
	demosrc/getargs.c demosrc/mgfparse.c demosrc/parse.c \
	src/parallel_intersec.c src/rasconnect/rasconnect.c

OBJECTS=$(SOURCES:.c=.o)

all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.c.o:
	$(CC) $(CFLAGS) $(DEFINES) $< -o $@

clean:
	@rm $(OBJECTS) $(EXECUTABLE)
